package com.itheima.pojo;

public class Result {
    private boolean flag; //操作成功/ 失败
    private String message; //成功/失败后的提示信息
    private Object result; //查询时返回的数据

    public Result() {
    }
    //即可指定成功/失败，也可以指定提示信息
    public Result(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }
    //相比上面的，可以返回数据
    public Result(boolean flag, String message, Object result) {
        this.flag = flag;
        this.message = message;
        this.result = result;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }
}
